<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>


<div   class="easyui-layout" style="width:100%;height:100%;" fit="true">
	<div data-options="region:'north',title:'',split:true" style="height:40px;background-color:#e6edfd;">
    	<form action="" id="providerForm"  >
    	<table class="screen">
			<tr>
				<td class="screen-n"><span>中文名称</span></td>
				<td class="screen-n">
					<input type="text" id="brand_chsName" class="screen-input" style="width:200px" onkeydown="pms.kd13('initBrands')">
				</td>
				<td class="screen-n">
					<input type="button" class="button" value="查询" onclick="initBrands()">
				</td>
			</tr>
		</table>
		</form>
    </div>
    <div data-options="region:'center',split:true" style="width: 100%;height: 100%">
		<table id="tableGrid"></table>
	</div>
</div>  
<script>
var brandsTable;
$(function(){
	initBrands();
});

function initBrands(){
	brandsTable = $('#tableGrid').pDataGrid({
		columns:[[
	               {field:'brandChsName',title:'品牌中文',align:'center'},
	               {field:'brandEngName',title:'品牌英文',align:'center'},
	               {field:'brandSpell',title:'品牌拼音',align:'center'},
	               {field:'smallPic',title:'品牌logo',align:'center',
		        	  formatter : function(value, row) {
		        		  var str = '';
		        		  if(row.smallPic){
		        			  str = '已上传';
		        		  }else{
		        			  str = '未上传';
		        		  }
		        		  return str;
		        	  }
				   },
	               {field:'siteUrl',title:'官网地址',align:'center'}
		          ]],
		    url:'<c:url value="/brand/searchPageEmBBrand.do" />', 
		    pagination:true,//分页控件
		    pageSize:30,
		    singleSelect:false,
		    rownumbers:true,
		    queryParams:{
				"brandChsName":$('#brand_chsName').val(),
				"isShow":1
		    },
			onDblClickRow:function(index,row){
				parent.getBrand(row.brandChsName,row.brandId);
			}
	}); 
}

 
</script>
